# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Aleksana QWQ <me@aleksana.moe>

pkgname=hyfetch
pkgver=1.4.10
pkgrel=1
pkgdesc="Neofetch with LGBTQ+ pride flags!"
arch=('any')
url='https://github.com/hykilpikonna/hyfetch'
license=('MIT')
depends=('python-setuptools' 'python-typing_extensions' 'python-importlib-metadata')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('a8988b081c79a4a80d92262e3588fab1ad7f890ff6dbfb4ed76f697be1f8d903')

build() {
	cd "${pkgname}-${pkgver}"
  	python setup.py build
}

package() {
	cd "${pkgname}-${pkgver}"
  	python setup.py install --root="${pkgdir}" --optimize=1 --skip-build 

	install -Dm 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
	install -Dm 644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -Dm 644 "${pkgname}/scripts/autocomplete.bash" "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
	install -Dm 644 "${pkgname}/scripts/autocomplete.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
}
